\(\int \frac {\cosh (c+d x)}{a+b \text {csch}(c+d x)} \, dx\) [20]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 34 \[ \int \frac {\cosh (c+d x)}{a+b \text {csch}(c+d x)} \, dx=-\frac {b \log (b+a \sinh (c+d x))}{a^2 d}+\frac {\sinh (c+d x)}{a d} \]

[Out]

-b*ln(b+a*sinh(d*x+c))/a^2/d+sinh(d*x+c)/a/d

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.211, Rules used = {3957, 2912, 12, 45} \[ \int \frac {\cosh (c+d x)}{a+b \text {csch}(c+d x)} \, dx=\frac {\sinh (c+d x)}{a d}-\frac {b \log (a \sinh (c+d x)+b)}{a^2 d} \]

[In]

Int[Cosh[c + d*x]/(a + b*Csch[c + d*x]),x]

[Out]

-((b*Log[b + a*Sinh[c + d*x]])/(a^2*d)) + Sinh[c + d*x]/(a*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2912

Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)
])^(n_.), x_Symbol] :> Dist[1/(b*f), Subst[Int[(a + x)^m*(c + (d/b)*x)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[
{a, b, c, d, e, f, m, n}, x]

Rule 3957

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Co
s[e + f*x])^p*((b + a*Sin[e + f*x])^m/Sin[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rubi steps \begin{align*} \text {integral}& = i \int \frac {\cosh (c+d x) \sinh (c+d x)}{i b+i a \sinh (c+d x)} \, dx \\ & = -\frac {i \text {Subst}\left (\int \frac {x}{a (i b+x)} \, dx,x,i a \sinh (c+d x)\right )}{a d} \\ & = -\frac {i \text {Subst}\left (\int \frac {x}{i b+x} \, dx,x,i a \sinh (c+d x)\right )}{a^2 d} \\ & = -\frac {i \text {Subst}\left (\int \left (1-\frac {b}{b-i x}\right ) \, dx,x,i a \sinh (c+d x)\right )}{a^2 d} \\ & = -\frac {b \log (b+a \sinh (c+d x))}{a^2 d}+\frac {\sinh (c+d x)}{a d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.88 \[ \int \frac {\cosh (c+d x)}{a+b \text {csch}(c+d x)} \, dx=\frac {-b \log (b+a \sinh (c+d x))+a \sinh (c+d x)}{a^2 d} \]

[In]

Integrate[Cosh[c + d*x]/(a + b*Csch[c + d*x]),x]

[Out]

(-(b*Log[b + a*Sinh[c + d*x]]) + a*Sinh[c + d*x])/(a^2*d)

Maple [A] (verified)

Time = 0.66 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.44

method result size
derivativedivides \(-\frac {\frac {b \ln \left (a +b \,\operatorname {csch}\left (d x +c \right )\right )}{a^{2}}-\frac {1}{a \,\operatorname {csch}\left (d x +c \right )}-\frac {b \ln \left (\operatorname {csch}\left (d x +c \right )\right )}{a^{2}}}{d}\) \(49\)
default \(-\frac {\frac {b \ln \left (a +b \,\operatorname {csch}\left (d x +c \right )\right )}{a^{2}}-\frac {1}{a \,\operatorname {csch}\left (d x +c \right )}-\frac {b \ln \left (\operatorname {csch}\left (d x +c \right )\right )}{a^{2}}}{d}\) \(49\)
risch \(\frac {b x}{a^{2}}+\frac {{\mathrm e}^{d x +c}}{2 a d}-\frac {{\mathrm e}^{-d x -c}}{2 a d}+\frac {2 b c}{d \,a^{2}}-\frac {b \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 b \,{\mathrm e}^{d x +c}}{a}-1\right )}{d \,a^{2}}\) \(82\)

[In]

int(cosh(d*x+c)/(a+b*csch(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

-1/d*(1/a^2*b*ln(a+b*csch(d*x+c))-1/a/csch(d*x+c)-1/a^2*b*ln(csch(d*x+c)))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 132 vs. \(2 (34) = 68\).

Time = 0.26 (sec) , antiderivative size = 132, normalized size of antiderivative = 3.88 \[ \int \frac {\cosh (c+d x)}{a+b \text {csch}(c+d x)} \, dx=\frac {2 \, b d x \cosh \left (d x + c\right ) + a \cosh \left (d x + c\right )^{2} + a \sinh \left (d x + c\right )^{2} - 2 \, {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \log \left (\frac {2 \, {\left (a \sinh \left (d x + c\right ) + b\right )}}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right ) + 2 \, {\left (b d x + a \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) - a}{2 \, {\left (a^{2} d \cosh \left (d x + c\right ) + a^{2} d \sinh \left (d x + c\right )\right )}} \]

[In]

integrate(cosh(d*x+c)/(a+b*csch(d*x+c)),x, algorithm="fricas")

[Out]

1/2*(2*b*d*x*cosh(d*x + c) + a*cosh(d*x + c)^2 + a*sinh(d*x + c)^2 - 2*(b*cosh(d*x + c) + b*sinh(d*x + c))*log
(2*(a*sinh(d*x + c) + b)/(cosh(d*x + c) - sinh(d*x + c))) + 2*(b*d*x + a*cosh(d*x + c))*sinh(d*x + c) - a)/(a^
2*d*cosh(d*x + c) + a^2*d*sinh(d*x + c))

Sympy [F]

\[ \int \frac {\cosh (c+d x)}{a+b \text {csch}(c+d x)} \, dx=\int \frac {\cosh {\left (c + d x \right )}}{a + b \operatorname {csch}{\left (c + d x \right )}}\, dx \]

[In]

integrate(cosh(d*x+c)/(a+b*csch(d*x+c)),x)

[Out]

Integral(cosh(c + d*x)/(a + b*csch(c + d*x)), x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 83 vs. \(2 (34) = 68\).

Time = 0.20 (sec) , antiderivative size = 83, normalized size of antiderivative = 2.44 \[ \int \frac {\cosh (c+d x)}{a+b \text {csch}(c+d x)} \, dx=-\frac {{\left (d x + c\right )} b}{a^{2} d} + \frac {e^{\left (d x + c\right )}}{2 \, a d} - \frac {e^{\left (-d x - c\right )}}{2 \, a d} - \frac {b \log \left (-2 \, b e^{\left (-d x - c\right )} + a e^{\left (-2 \, d x - 2 \, c\right )} - a\right )}{a^{2} d} \]

[In]

integrate(cosh(d*x+c)/(a+b*csch(d*x+c)),x, algorithm="maxima")

[Out]

-(d*x + c)*b/(a^2*d) + 1/2*e^(d*x + c)/(a*d) - 1/2*e^(-d*x - c)/(a*d) - b*log(-2*b*e^(-d*x - c) + a*e^(-2*d*x
- 2*c) - a)/(a^2*d)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.76 \[ \int \frac {\cosh (c+d x)}{a+b \text {csch}(c+d x)} \, dx=\frac {\frac {e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}}{a} - \frac {2 \, b \log \left ({\left | a {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} + 2 \, b \right |}\right )}{a^{2}}}{2 \, d} \]

[In]

integrate(cosh(d*x+c)/(a+b*csch(d*x+c)),x, algorithm="giac")

[Out]

1/2*((e^(d*x + c) - e^(-d*x - c))/a - 2*b*log(abs(a*(e^(d*x + c) - e^(-d*x - c)) + 2*b))/a^2)/d

Mupad [B] (verification not implemented)

Time = 2.12 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.91 \[ \int \frac {\cosh (c+d x)}{a+b \text {csch}(c+d x)} \, dx=-\frac {b\,\ln \left (b+a\,\mathrm {sinh}\left (c+d\,x\right )\right )-a\,\mathrm {sinh}\left (c+d\,x\right )}{a^2\,d} \]

[In]

int(cosh(c + d*x)/(a + b/sinh(c + d*x)),x)

[Out]

-(b*log(b + a*sinh(c + d*x)) - a*sinh(c + d*x))/(a^2*d)